package com.catl.plc.master;

import com.serotonin.modbus4j.exception.ModbusTransportException;
import com.serotonin.modbus4j.msg.ModbusRequest;
import com.serotonin.modbus4j.msg.ModbusResponse;
import com.serotonin.modbus4j.serial.SerialMaster;
import com.serotonin.modbus4j.serial.SerialPortWrapper;

/**
 * 失败
 */

public class ModbusSerialMaster extends SerialMaster {

    public ModbusSerialMaster(SerialPortWrapper wrapper) {
        super(wrapper);
    }

    @Override
    public void destroy() {
        close();
    }

    @Override
    public ModbusResponse sendImpl(ModbusRequest modbusRequest) throws ModbusTransportException {
        return send(modbusRequest);
    }
}
